//
//  ImageViewl+Extension.swift
//  HuaYun
//
//  Created by enghou on 2018/7/16.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

import Foundation

import Kingfisher

extension UIImageView{
    
    func image(with url: String) -> Void {
        self.image(with: url, placeHolder: nil)
    }
    
    func image(with url: String,placeHolder: UIImage?) -> Void {
        
        guard let fileurl = URL(string: url) else { return }
        
        self.kf.setImage(with: ImageResource(downloadURL: fileurl), placeholder: placeHolder, options: nil, progressBlock: nil, completionHandler: nil)
        
    }
    
    
}
